package com.qianyu.project.web.controller.gs;

import com.qianyu.project.service.ISubTenderDetailService;
import com.qianyu.project.service.ITenderPurchaseDetailService;
import com.qianyu.project.utils.Result;
import com.qianyu.project.utils.ResultTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author gs
 * @date create in 2021/2/1 21:33
 */
@RestController
@RequestMapping("/subTenderDetails")
public class SubTenderDetailController {

    @Autowired
    private ISubTenderDetailService subTenderDetailService;

    @GetMapping("/plan/{id}")
    public Result getByPlan(@PathVariable String id) {
        return ResultTool.success(subTenderDetailService.getByPlan(id));
    }

    @GetMapping("/page")
    public Result getByPage(@RequestParam Map<String, String> params) {
        return ResultTool.success(subTenderDetailService.getPageList(params));
    }
}
